var p = "e714a17976d4e08a5ac066b058cf036a", l = "wx6e82da3b4a763b76", y = require("md5"), r = require("request"), a = require("xml2js");

module.o.t = function(e, r, t, n) {
    var o, a = {};
    a.i = e, a.u = r, a.m = String(t), a.body = n, a.p = "https:/beautycafe.club/order/returnPay", 
    a.l = "123.12.12.123", a.s = l, a.j = "1509077621", a.v = "JSAPI", a.S = (o = 1e3 * Math.random(), 
    y(String(o)));
    for (var i = Object.keys(a).sort(function(e, r) {
        return e.toLowerCase().localeCompare(r.toLowerCase());
    }), u = "", c = 0; c < i.length; c++) {
        u += (f = i[c]) + "=" + a[f] + "&";
    }
    var d = y(u += "key=" + p).toUpperCase();
    a.sign = d, i = Object.keys(a).sort(function(e, r) {
        return e.toLowerCase().localeCompare(r.toLowerCase());
    }), console.log("jjojojoo");
    var m = "<xml>";
    for (c = 0; c < i.length; c++) {
        var f;
        m += "<" + (f = i[c]) + ">" + a[f] + "</" + f + ">";
    }
    return [ m += "</xml>", a ];
}, module.o.q = function(e, o) {
    r({
        url: "https://api.mch.weixin.qq.com/pay/unifiedorder",
        method: "POST",
        timeout: 1e4,
        g: !0,
        h: 10,
        body: e
    }, function(t, n, e) {
        console.log(e), a.k(e, function(e, r) {
            o(t, n, r.O);
        });
    });
}, module.o.P = function(e) {
    var r = String(new Date().getTime()), t = "appId=" + l + "&nonceStr=" + e.S[0] + "&package=prepay_id=" + e.D + "&signType=MD5&timeStamp=" + r + "&key=" + p, n = y(t), o = {};
    return o.I = n, o.M = "prepay_id=" + e.D[0], o.R = e.S[0], o.timeStamp = r, o;
};